<?php

namespace app\admin\validate;

use think\Validate;


class Banner extends Validate
{
    protected $rule = [
        'title' => 'require',
        'image' => 'require|url',
        'type' => 'require|number',
    ];
    protected $message = [
        'title.require' => 'banner标题不能为空',
        'image.require' => 'banner图片不能为空',
        'image.url' => 'banner图片地址格式不正确',
        'type.require' => 'banner类型不能为空',
        'type.number' => 'banner类型只能为数字'
    ];
}